# -*- coding: utf-8 -*-
from odoo import api, fields, models

class SaleOrderCustomize(models.Model):
    _inherit = 'sale.order'

    remark = fields.Text(string='備註事項')
    search_remarks = fields.Char(related='order_line.remarks')
    search_partner_mobile = fields.Char(related='partner_id.mobile')
    search_partner_phone = fields.Char(related='partner_id.phone')
    Shipping_address = fields.Char(string='收貨地址', related='partner_shipping_id.street', store=True)

    def update_remarks(self):
        for line in self.search([]):
            for row in line.order_line:
                row.remarks = row.indoor_location

class SaleOrderLineCustomize(models.Model):
    _inherit = 'sale.order.line'

    remarks = fields.Char(string='備註')